import { getUserInfo } from '@/libs/util.js'
export default {
  state: {
    access: ''
  },
  mutations: {
    setAccess (state, access) {
      state.access = access
    }
  },
  actions: {
    // 获取权限
    getUserInfo ({ state, commit }) {
      return getUserInfo()
        .then((data) => {
          commit('setAccess', data.access)
        })
    }
  }
}
